/*
 * Copyright 2010-2012 Susanta Tewari. <freecode4susant@users.sourceforge.net>
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package provider.impl.genomemap.data;

import genomemap.data.KSA00Data;
import genomemap.data.TAB08Data;

import java.io.File;

/**
 * @author Susanta Tewari
 */
public class Util {

    /**
     * Constructs ...
     *
     */
    private Util() {}

    /**
     * Method description
     *
     *
     * @param file
     *
     * @return
     *
     * @throws Exception
     */
    public static TAB08Data createTAB08Data(final String file) throws Exception {

        final TAB08DataProviderImplXML impl = new TAB08DataProviderImplXML();

        impl.setDataFile(new File(Util.class.getResource(file).toURI()));

        return impl.create();
    }

    /**
     * Method description
     *
     *
     * @param file
     *
     * @return
     *
     * @throws Exception
     */
    public static KSA00Data createKSA00Data(final String file) throws Exception {

        final KSA00DataProviderImplXML impl = new KSA00DataProviderImplXML();

        impl.setDataFile(new File(Util.class.getResource(file).toURI()));

        return impl.create();
    }
}
